﻿
-- =============================================
-- Author:		<Author,徐福龙>
-- Create date: <Create Date,2012 02 17>
-- Description:	<Description,用于获取员工的档案中的ID信息,查看员工本人档案时使用此方法>
-- =============================================
CREATE PROCEDURE [dbo].[proc_Employee_GetDetailsItem_Id] 
	(
		@UserName nvarchar(50)
	)
AS
BEGIN

	DECLARE @Check_username int
	Select @Check_username=Count(id) From [Employee] Where [UserName]=@UserName
	if(@Check_username<>0)
	BEGIN
	Select id From [Employee] Where [UserName]=@UserName
	END
		else
			BEGIN
		select  0 as id
			END
END

